package com.example.a79273.nvshenyichu.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.a79273.nvshenyichu.model.MatchTitleBean;

import java.util.List;

/**
 * Created by lenovo on 2016/8/29.
 */
public class MatchAdapter extends FragmentPagerAdapter {
    private List<String> mListTitle;
    private List<Fragment> mData;

    public MatchAdapter(FragmentManager fm, List<Fragment> mData, List<String> mListTitle) {
        super(fm);
        this.mData = mData;
        this.mListTitle = mListTitle;
    }

    @Override
    public Fragment getItem(int position) {
        return mData.get(position);
    }

    @Override
    public int getCount() {
        return mData == null?0:mData.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mListTitle.get(position);
    }
}
